﻿' NOTE: If you change the interface name "IFileManagerService" here, you must also update the reference to "IFileManagerService" in Web.config.
<ServiceContract()> _
Public Interface IFileManagerService
    '<OperationContract()> _
    'Function GetDataUsingDataContract(ByVal composite As CompositeType) As CompositeType
#Region "Folders"
    <OperationContract()> _
    Function GetFolders(ByVal FolderPath As String, ByVal FolderName As String) As List(Of ServerFolder)
    Event FolderAdding As FolderAddingEventHandler
    Event FolderAdded As FolderAddedEventHandler
    <OperationContract()> _
    Function AddFolder(ByVal FolderPath As String, ByVal Foldername As String) As String
    Event FolderDeleting As FolderDeletingEventHandler
    Event FolderDeleted As FolderDeletedEventHandler
    <OperationContract()> _
    Function DeleteFolder(ByVal FolderPath As String, ByVal Foldername As String) As String
    Event FolderUpdating As FolderUpdatingEventHandler
    Event FolderUpdated As FolderUpdatedEventHandler
    <OperationContract()> _
    Function UpdateFolder(ByVal OrigFolderPath As String, ByVal OrigFolderName As String, ByVal NewFolderPath As String, ByVal NewFolderName As String) As String
#End Region
#Region "Files"
    <OperationContract()> _
    Function GetFiles(ByVal FilePath As String, ByVal FileName As String) As List(Of ServerFile)
    Event FileDeleting As FileDeletingEventHandler
    Event FileDeleted As FileDeletedEventHandler
    <OperationContract()> _
    Function DeleteFile(ByVal FilePath As String, ByVal FileName As String) As String
    Event FileUpdating As FileUpdatingEventHandler
    Event FileUpdated As FileUpdatedEventHandler
    <OperationContract()> _
     Function UpdateFile(ByVal OrigFolderPath As String, ByVal OrigFileName As String, ByVal NewFolderPath As String, ByVal NewFileName As String) As String
#End Region
#Region "Extra"
    <OperationContract()> _
    Function GetAllFileNames(ByVal baseDir As String) As String()

    <OperationContract()> _
    Function GetFileTreeDomainAndTypeAndSubType(ByVal domain As String, ByVal typePath As String, ByVal subTypePath As String) As List(Of ServerFolder)

    <OperationContract()> _
    Function GetFileTreeDomainAndType(ByVal domain As String, ByVal typePath As String) As List(Of ServerFolder)

    <OperationContract()> _
    Function GetFileTreeDomain(ByVal domain As String) As List(Of ServerFolder)

    <OperationContract()> _
    Function GetFileTreeAll() As List(Of ServerFolder)

    <OperationContract()> _
    Function Reset() As Boolean

#End Region
End Interface

'' Use a data contract as illustrated in the sample below to add composite types to service operations.
'<DataContract()> _
'Public Class CompositeType
'    Private boolValueField As Boolean
'    Private stringValueField As String
'    <DataMember()> _
'    Public Property BoolValue() As Boolean
'        Get
'            Return Me.boolValueField
'        End Get
'        Set(ByVal value As Boolean)
'            Me.boolValueField = value
'        End Set
'    End Property
'    <DataMember()> _
'    Public Property StringValue() As String
'        Get
'            Return Me.stringValueField
'        End Get
'        Set(ByVal value As String)
'            Me.stringValueField = value
'        End Set
'    End Property
'End Class